import request from '@/utils/request'
// 获取树结构
export function GetTreeAPI(params) {
  return request({
    url: '/system/modeling/listChildren',
    method: 'GET',
    params
  })
}

// 列表
export function GetListAPI(params) {
  return request({
    url: '/equipment/device/list',
    method: 'GET',
    params
  })
}
// 新增
export function AddDataAPI(data) {
  return request({
    url: '/equipment/device/add',
    method: 'POST',
    data
  })
}

// 修改
export function EditDataAPI(data) {
  return request({
    url: '/equipment/device/edit',
    method: 'POST',
    data
  })
}

// 删除
export function DelDataAPI(params) {
  return request({
    url: '/equipment/device/remove',
    method: 'DELETE',
    params: { ids: params }
  })
}

// 详情
export function GetDetailsAPI(val) {
  return request({
    url: '/equipment/device/view',
    method: 'GET',
    params: { id: val }
  })
}

// 部门
export function GetDeptPI(val) {
  return request({
    url: '/equipment/device/dept/treeselect',
    method: 'GET'
  })
}
